{include file="public/header" /}
<body>

<div class="layui-fluid">
    <div class="layui-card" >
		<div class="layui-card-header">修改文章</div>
      

        <form class="layui-form" action="" id="form1" lay-filter="form1">
            
            
<div class="layui-form-item">
    <label class="layui-form-label">课程介绍</label>
	<div class="layui-input-block">
		﻿  
                    <div style="display:none;">
                        <textarea name=introduce id=introduce>
                               
                        </textarea>
                  </div>
                    

                <div class="myumeditor">
                   
                    <!--style给定宽度可以影响编辑器的最终宽度 PHP editorValue[] -->
                    <script type="text/plain" id="myEditor_introduce"  style="width:1000px;height:240px;">
                        {$info['introduce']}
					
                     </script>
                    <script type="text/javascript">
                        //实例化编辑器
                        var um = UM.getEditor('myEditor_introduce');
                    </script>
                </div>

                <!-- UM.getEditor('myEditor_introduce').getContentTxt() -->﻿<input type="hidden" id="id" name="id" value="{$info['id']}">
	</div>
    <div class="layui-form-mid layui-word-aux"></div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label">目录名称</label>
	<div class="layui-input-block">
		<input type="text" lay-verify="required" class="layui-input" id="name" name="name" value="{$info['name']}" >
	</div>
    <div class="layui-form-mid layui-word-aux"></div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label">价格</label>
	<div class="layui-input-block">
		<input type="text" lay-verify="required" class="layui-input" id="sprice" name="sprice" value="{$info['sprice']}" >
	</div>
    <div class="layui-form-mid layui-word-aux"></div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label">vip价格</label>
	<div class="layui-input-block">
		<input type="text" lay-verify="required" class="layui-input" id="vip_sprice" name="vip_sprice" value="{$info['vip_sprice']}" >
	</div>
    <div class="layui-form-mid layui-word-aux"></div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label">所属分类</label>
	<div class="layui-input-block">
		<select name="category_id" id="category_id" lay-filter="category_id"></select>
<script>loadselect("{:url('loadclass')}?v="+Math.random(),'category_id','eschool_catgory','',0,'id',"{$info['category_id']}");</script>


	</div>
    <div class="layui-form-mid layui-word-aux"></div>
</div>


<div class="layui-form-item">
    <label class="layui-form-label">图片</label>
	<div class="layui-input-block">
		<div class="layui-upload-drag" id="image_upload1">
  <i class="layui-icon"></i>
  <p>点击上传，或将文件拖拽到此处</p>
  <div class="layui-hide" id="image_uploadDemoView">
    <hr>
    <img src="{$info['image']}" alt="上传成功后渲染" style="max-width: 196px">
  </div>
  <input type="hidden" name=image id=image value="{$info['image']}"  >
</div>
<SCRIPT>
	layui.use(['upload', 'jquery'], function(){
		var $ = layui.$
			,upload = layui.upload;
		//拖拽上传
		layui.$('#image_uploadDemoView').removeClass('layui-hide')
		  upload.render({
			elem: '#image_upload1'
			,url: uploadimgurl //改成您自己的上传接口
			,done: function(res){
				console.log(res)
			  layer.msg('上传成功');
			  $('#image').val(res.data)
			  layui.$('#image_uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.data);
			}
		  });
	});
</SCRIPT>
	</div>
    <div class="layui-form-mid layui-word-aux"></div>
</div>



            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="savedata">保存修改</button>
                </div>
            </div>
        </form>

    </div>

</div>

      {include file="public/footer" /}
      <script>
			var uploadimgurl = "{:url('/comm/upload/uploadimg')}";
      </script>
      <script src="__SKIN__/js/jmzhfsconfiguploadform.js?v=1.222"></script>
  
      <script type="text/javascript">


            $(function () {
                  formsubmit('form1',"{$editurl}");
            });

      </script>

<style>

    /* 每列表单过多，防止窜行，缩小宽度 */
    .layui-form-label{
       padding: 9px 10px;
    }
    
</style> 
</body>


</html>